I have just uploaded NetRefactor2005 on the KnowDotNet site. It has all the features of NetRefactor for previous versions of Visual Studio .NET. It was a while in being released because of learning to deploy addins in VS2005.
Microsoft did remove some of the "COM" ness from addins in VS2005, but the Addin Wizard does not do as much for you in the new version. It actually does nothing for you in the setup and deployment area. In fact, it does not even create a Setup project for you. Deployment is completely up to the developer. I have written an article on deployment at http://knowdotnet.com/articles/addininstallation.html. It has some useful code that will help you to get your addins deployed.
I am beginning to write articles on addin development for VS2005. I would like feedback or suggestions on articles that developers would like to see on this or other .NET subjects. I can't write on everything, but my partners and I together can take a crack at a lot of subjects.
Let me hear from you.
6 Comments:
Great! This was exactly what I was searching for. One thing worth mentioning is that I needed to change the InstallerClass property to false in order to get the application to run... Thanks!
Hi, extracting an interface with VB.NET was not smart enough to realise that the "readonly" property modifier must appear in the interface. It produced "Property XXX as YYY" instead of "ReadOnly Property XXX as YYY".
Temporarily lost my password for my blog. I am looking into the problem and will post a new version of NetRefactor when I get it corrected.
Thanks for the information.
Les
Hi there!
My company is working on converting an application that uses a lot of dynamic sql to use parameters instead. We just bought your tool NetRefactor and think it is great and saves us a lot of time but it seems we've found a few bugs.
When converting the following C# code:
string sqlQuery = @"
SELECT
*
FROM
users
WHERE
status <> 'D' AND
user_id = " + userId.ToString() + @" ";
if (ApplicationManager.UseSharedDataBase)
sqlQuery += " AND application = '" + ApplicationManager.PrefixForProject + "' ";
NetRefactor produces the following code:
string sqlCmd = new SqlClient.SqlCommand();
string sqlQuery = @"
SELECT
*
FROM
users
WHERE
status <> 'D' AND
user_id = @dbParam1 ".ToString() + @" ";
sqlCmd.Parameters.Add("@dbParam1", userId);
if (ApplicationManager.UseSharedDataBase)
sqlQuery += " AND application = @dbParam2 ";
sqlCmd.Parameters.Add("@dbParam2", ApplicationManager.PrefixForProject);
sqlCmd.CommandText = sqlQuery;
sqlCmd.CommandType = CommandType.Text;
The first line is incorrect:
string sqlCmd = new SqlClient.SqlCommand();
It should be:
SqlClient.SqlCommand sqlCmd = new SqlClient.SqlCommand();
And then there is a problem when converting the "userId.ToString()" section as you can see, could this behaviour be caused by using multiline @" .. " string blocks or by using the .ToString() method?
VS2008 says that "sqlCmd.Parameters.Add" is obsolete and "sqlCmd.Parameters.AddWithValue" should be used instead.
Is there any chance that this could be fixed in a future update soon?
Best regards,
Fredrik Bodelson
Thanks for the comment. I will look at the problem.
hye,,
just read your blog on 'Finding Start and End Dates of Previous Week '
and i want to ask you if you can help me.i have to loop and display the date from start date till end date where both are input by user. The date display also depends on the day of the week. Example: users have enter Monday and Wednesday for the days input and have enter 4th Jan 2010 as a start date and 19th April 2010 as end date.. so how to display the date between those days and dates.. really hope there is a way..thanks!
Post a Comment
<< Home